<div class="zxlybox">
    <p>请选择领域 <span>（可多选）</span></p>
    <ul>
        <li class="zxlybtn" :class="{zxlybtn2:chooseAfterValue.indexOf( item.text )!=-1}" v-for="(item,index) in lyList" :key="index" @click="choosely(index,item.text)">
            <span>{{item.text}}</span>
            <img v-if="chooseAfterValue.indexOf( item.text )!=-1" src="../../../static/img/close.png" alt="">
        </li>
    </ul>
    <p class="btn"><span @click="xzly">取消</span><span @click="sure">确定</span></p>
</div>

export default {
    name:'enter',
    data(){
        return{
            lyList:[
                {text:'绘画'},
                {text:'书法'},
                {text:'陶瓷'},
                {text:'紫砂'},
                {text:'玉石'},
                {text:'金属'},
                {text:'雕塑'},
                {text:'宗教'},
                {text:'文玩'},
                {text:'非遗'},
                {text:'杂项'},
            ],
            chooseAfterValue:[],
         }
     }，
     methods：{
         choosely(n,value){
                if(this.chooseAfterValue.indexOf( value )!=-1){
                    this.chooseAfterValue.splice( this.chooseAfterValue.indexOf( value ), 1 )
                }else{
                    this.chooseAfterValue.push(value)
                }
            },
     }
}